/**
 * 
 */
package OOP_1;

/**
 * @Description
 * @author zych1108
 * @version
 * @date 2021年6月11日上午10:01:30
 */
public class BankTest {
	public static void main(String[] args) {
		Bank bank = new Bank();
		
		//添加顾客
		bank.addCustomer("Tom", "Smith");
		bank.addCustomer("Jenny", "nuguiry");
		
		//查看顾客个数
		int i = bank.getNumOfCustomer();
		System.out.println(i);
		
		//返回顾客
		bank.getCustomer(3);
		System.out.println(bank.getCustomer(1).getFirstName());
		
		//设置账户
		bank.getCustomer(1).setAccount(new Account(2000));//设置账户余额为2000
		
		System.out.println("账户余额为"+ bank.getCustomer(1).getAccount().getbalance());
		
		//取500
		 bank.getCustomer(1).getAccount().withdraw(500);
		 bank.getCustomer(1).getAccount().deposit(200);
		 bank.getCustomer(1).getAccount().withdraw(5000);
	}
}
